package week9.Q4;

public class Test {
    public static void main(String[] args) {
        Vehicle vehicle[]=new Vehicle[3];
        vehicle[0]=new Car("奔驰","黑","12345");
        vehicle[1]=new Bicycle("捷安特","白");
        vehicle[2]=new ElectricVehicle("雅迪","蓝");
        Developer developer = new Developer();
        System.out.println(vehicle[1] instanceof IPower);

        for (int i =0;i< vehicle.length;i++){
            developer.takingVehicle(vehicle[i]);
            if(vehicle[i] instanceof IPower){
                ((IPower) vehicle[i]).power();
            }

      }




    }

}
